import React, { forwardRef } from 'react';
import { AxStandardWideListProps } from './data.d';
import { AxStandardLayout } from '../AxStandardLayout';
import { TableProps } from "antd/lib/table";
import { AxTable } from '..';


const StandardWideList = (props: AxStandardWideListProps & TableProps<any>, ref: any) => {
    return (
        <AxStandardLayout
            ref={ref}
            {...props}
            RenderComponent={(args: any) =>
                <>
                    <AxTable
                        ref={args.tableRef}
                        size='small'
                        bordered
                        // checkboxModel={false}
                        addemptycolumn={true}
                        columns={args.columns}
                        data={args.data}
                        loading={args.loading}
                        onChange={args.handleTableChange}
                        {...args.rest}
                    />
                </>
            }
        >
        </AxStandardLayout>
    );
}

const AxStandardWideList = forwardRef(StandardWideList);

export { AxStandardWideList };

